package com.tobe.main;

import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.UIManager;

import com.tobe.ui.menu.TopMenu;
import com.tobe.util.IconRes;

public class MainFrame extends JFrame {
	private static final long serialVersionUID = 1L;
	
	public static MainFrame ins; 
	public MainFrame() {
	        initComponents();
//	        designer.newPanel();
	        setIconImage(IconRes.IMAGE_APP);
	        ins = this;
	        
	    }
	 

	    /** This method is called from within the constructor to
	     * initialize the form.
	     * WARNING: Do NOT modify this code. The content of this method is
	     * always regenerated by the Form Editor.
	     */
	    private void initComponents() {

//	        designer = new dyno.swing.designer.main.DesigningPanel();

	        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
	        setTitle("游戏辅助工具");
	        TopMenu menu = new TopMenu();
	        setJMenuBar(menu);
	        getContentPane().add(new LeftPanel(), java.awt.BorderLayout.WEST);
	        pack();
	    }
	    
	    /**
	     * @param args the command line arguments
	     */
	    public static void main(String[] args) {
//	        Introspector.setBeanInfoSearchPath(new String[]{"dyno.swing.designer.beaninfo"});
	       
	    	//设置为当前平台LAF
	    	try {
	            UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
	        } catch (Exception ex) {
	        	ex.printStackTrace();
	        }
	        java.awt.EventQueue.invokeLater(new Runnable() {
	            public void run() {
	                MainFrame frame = new MainFrame();
	                frame.setSize(1146, 832);
	                frame.setLocationRelativeTo(null);//居中
	                frame.setVisible(true);
	            }
	        });
	    }

}
